package com.briup.server;

import com.briup.interfaces.impl.ConfigurationImpl;
import com.briup.entity.Environment;
import com.briup.interfaces.DbStore;
import com.briup.interfaces.Server;

import java.util.Collection;

/**
 * 服务器端启动类
 */
public class ServerMain {
    public static void main(String[] args) {
        // 服务器对象
        Server server = new ConfigurationImpl().getServer();
        // 入库模块对象
        DbStore dbStore = new ConfigurationImpl().getDbStore();
        // 1. 接收
        Collection<Environment> coll = server.receive();
        // 2. 入库
        dbStore.dbStore(coll);
    }
}
